package com.ndp.fb.walle.business;

import com.ndp.fb.exception.CheckedException;
import com.ndp.fb.rdb.model.EcMaterielTag;
import com.ndp.fb.rdb.model.EcTemplateMateriel;
import com.ndp.fb.rdb.model.EcTemplateMaterielExt;
import com.ndp.fb.rdb.model.Pager;
import com.ndp.fb.rdb.model.User;
import com.ndp.fb.walle.model.vo.ectemplatemateriel.param.AdvancedParam;
import com.ndp.fb.walle.model.vo.ectemplatemateriel.param.EcBuildCreativeParam;
import com.ndp.fb.walle.model.vo.ectemplatemateriel.param.EcTempMateSaveParam;

import java.util.List;
import java.util.Map;

/**
 * Created by hexin on 2016/5/20.
 */
public interface EcTemplateMaterielService {
    /**
     * 查询模板样式关联的广告情况
     *
     * @param id
     * @return
     */
    EcTemplateMaterielExt findext(Long id);

    EcTemplateMateriel findById(Long id);

    Integer getprogress(Long id);

    /**
     * <a href="http://172.30.10.223/pages/viewpage.action?pageId=20938795">http://172.30.10.223/pages/viewpage.action?pageId=20938795<a/>
     *
     * @return
     */
    Pager<Map> findPager(Integer feedId,User user, String name,Long tagId, String type, List<String> creativeStatus, List<Map<String,List<String>>> categoryList, Integer firstResult, Integer sizeNo, String order);

    /**
     * @param id
     * @return
     */
    Map viewMore(Long id);

    List<EcMaterielTag> queryTags(User user, String q);

    void delete(User user, Long id);

    Long save(EcTempMateSaveParam param, User user) throws CheckedException;

    Map findByEditOrCopy(String lang,Long id);

    boolean checkName(Long orgId, String name);

    /**
     * @discription  保存fbUser
     * @author       evan
     * 创建时间        2016年6月1日 上午11:36:37
     * @return
     */
    List<String> buildCreative(User user, EcBuildCreativeParam param) throws Exception;

    boolean reBuild(Long id);

    Map<String, Object> buildAdvancedData(AdvancedParam param, Long orgId);

    void fixOriginalPicTempldate();
}
